Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unify model implementation and clean up their code in AgentScope. #82

Merged
merged 8 commits into from
Mar 20, 2024

Conversation

DavdGao
Copy link
Collaborator

@DavdGao DavdGao commented Mar 18, 2024

Description

  1. Move _metric to ModelWrapperBase class to avoid duplicated declaration.
  2. Unify the attribute model and model_name into model_name for all model wrappers. Note this change doesn't change the argument model_name in constructors, so it won't affect the users' model configuration.
  3. Change parent classes for Gemini, OpenAI, ollama and DashScope into abstract class. (Because they don't implement the abstract __call__ function defined in ModelWrapperBase, and they cannot be used by users directly.)
  4. Unify name of the parent classes for Gemini, OpenAI, ollama and DashScope into xxxBase, e.g. GeminiWrapperBase
  5. Create a update_monitor function in ModelWrapperBase

Checklist

Please check the following items before code is ready to be reviewed.

  • Code has passed all tests
  • Docstrings have been added/updated in Google Style
  • Documentation has been updated
  • Code is ready for review

…mentations; 2. change child class for openai, dashscope, gemini and ollama to abstract class; 3.
Copy link
Collaborator

@pan-x-c pan-x-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@pan-x-c pan-x-c merged commit 3587120 into modelscope:main Mar 20, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants